<template>
    <div class="">
      <el-table :data="fankuis" style="width: 100%">
      <el-table-column
        align="center"
        fixed
        prop="fankui_id"
        label="反馈号"
        width="150"
      />
      <el-table-column
        align="center"
        prop="neirong"
        label="反馈内容"
        width="400"
      >
      </el-table-column>
      <el-table-column
        align="center"
        prop="image1"
        label="反馈图片1"
        width="150"
      >
      <template #default="scope">
        <span v-if="scope.row.image1"><el-image  :src="scope.row.image1" width="100" height="100" /></span>
      </template>
        </el-table-column>
        <el-table-column
        align="center"
        prop="image2"
        label="反馈图片2"
        width="150"
      >
      <template #default="scope">
        <span v-if="scope.row.image1"><el-image :src="scope.row.image2" width="100" height="100" /></span>
      </template>
        </el-table-column>
        <el-table-column
        align="center"
        prop="image3"
        label="反馈图片3"
        width="150"
      >
      <template #default="scope">
        <span v-if="scope.row.image1"><el-image :src="scope.row.image3" width="100" height="100" /></span>
      </template>
        </el-table-column>
    </el-table>
    <div class="pagination">
      <el-pagination
      style="margin-top: 20px;" 
    :default-page-size="Page_Size" 
    @current-change="changepage($event)" 
    background layout="prev, pager, next" 
    :total="total" />
    </div>
    </div>
  </template>
  
  <script lang="ts" setup>
  import {ref,reactive,onBeforeMount} from 'vue'
  import {getfankuis} from "@/service/api/fankui"
  onBeforeMount(()=>{
    getFankuis()
  })
let fankuis=ref([])
let total=ref(0)
let Page_No=ref(1)
let Page_Size=ref(10)
  function getFankuis(){
    getfankuis({
      Page_No:Page_No.value,
      Page_Size:Page_Size.value
    }).then(res=>{
      
      if(res.data.code===200){
        fankuis.value=res.data.data
        total.value=res.data.total
        console.log(fankuis.value)
      }
    })
  }
  function changepage(e){
    Page_No.value=e
    getFankuis()
  }

  </script>
  
  
  <style lang="scss" scoped>
.pagination{
  width: 100%;
  display: flex;
  justify-content: center;
}
</style>
  